
fetch("http://localhost:3000/personalized/newsong",{
    method:"GET",
    mode:"cors"
})
.then(function (r) {
    if(r.status==200){
        return r.json();
    }
})
.then(function (data) {
    console.log(data);
    let string=""
    data.result.forEach(value=>{
        let sq_string=""
        if(value.song.album.subType=="录音室版"){
            sq_string=`
            <sq_icon class="sq"></sq_icon>`
        }
        string+=
            `
            <a href="songplay.html?id=${value.id}">
            <li>
                   <div class="paly_btn"></div>
            <h3>${value.name}<span>${value.song.alias.toString()}</span></h3>
            <p>${sq_string}${value.song.album.name}-${value.song.artists[0].name}</p>
            </li>
            </a>
            `
    })
   $(".new_song>ul").innerHTML=string;
})